package com.ruoyi.insect.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.insect.mapper.DiseaseRecordMapper;
import com.ruoyi.insect.domain.DiseaseRecord;
import com.ruoyi.insect.service.IDiseaseRecordService;

/**
 * 历史记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-31
 */
@Service
public class DiseaseRecordServiceImpl implements IDiseaseRecordService 
{
    @Autowired
    private DiseaseRecordMapper diseaseRecordMapper;

    /**
     * 查询历史记录
     * 
     * @param id 历史记录主键
     * @return 历史记录
     */
    @Override
    public DiseaseRecord selectDiseaseRecordById(String id)
    {
        return diseaseRecordMapper.selectDiseaseRecordById(id);
    }

    /**
     * 查询历史记录列表
     * 
     * @param diseaseRecord 历史记录
     * @return 历史记录
     */
    @Override
    public List<DiseaseRecord> selectDiseaseRecordList(DiseaseRecord diseaseRecord)
    {
        return diseaseRecordMapper.selectDiseaseRecordList(diseaseRecord);
    }

    /**
     * 新增历史记录
     * 
     * @param diseaseRecord 历史记录
     * @return 结果
     */
    @Override
    public int insertDiseaseRecord(DiseaseRecord diseaseRecord)
    {
        return diseaseRecordMapper.insertDiseaseRecord(diseaseRecord);
    }

    /**
     * 修改历史记录
     * 
     * @param diseaseRecord 历史记录
     * @return 结果
     */
    @Override
    public int updateDiseaseRecord(DiseaseRecord diseaseRecord)
    {
        return diseaseRecordMapper.updateDiseaseRecord(diseaseRecord);
    }

    /**
     * 批量删除历史记录
     * 
     * @param ids 需要删除的历史记录主键
     * @return 结果
     */
    @Override
    public int deleteDiseaseRecordByIds(String[] ids)
    {
        return diseaseRecordMapper.deleteDiseaseRecordByIds(ids);
    }

    /**
     * 删除历史记录信息
     * 
     * @param id 历史记录主键
     * @return 结果
     */
    @Override
    public int deleteDiseaseRecordById(String id)
    {
        return diseaseRecordMapper.deleteDiseaseRecordById(id);
    }
}
